GXSetShapeStyleAttributes
You can use theGXSetShapeStyleAttributes
function to alter the style attributes of the style object associated with a particular shape.
void GXSetShapeStyleAttributes(gxShape target, gxStyleAttribute attributes);
target
- A reference to the shape whose style attributes you want to alter.
attributes
The new set of attributes.DESCRIPTION
TheGXSetShapeStyleAttributes
function sets the style attributes of the style object associated with the shape specified by thetarget
parameter.If the target shape shares its style object with other shapes, this function makes a copy of the style object, sets the target shape to reference the copy, and changes the style attributes of the copy. (However, if the effect of this function would leave the style attributes unchanged, this function does not create a copy of the style object; instead, it posts a notice).
You can use this function in combination with the
GXGetShapeStyleAttributes
function to set or clear single style attributes. For example, to clear thegxSourceGridStyle
attribute of a style object associated with a target shape, you could use this line of code:
GXSetShapeStyleAttributes(target, GXGetShapeStyleAttributes(target & ~gxSourceGridStyle);To set thegxSourceGridStyle
attribute, you could use this line of code:
GXSetShapeStyleAttributes(target, GXGetShapeStyleAttributes(target | gxSourceGridStyle);ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory style_is_nil inconsistent_parameters (debugging version) parameter_out_of_range (debugging version) Notices (debugging version) attributes_already_set SEE ALSO
For a discussion of style attributes, see "Style Attributes" on page 3-98.For an example of pen placement, see "Manipulating Pen Width and Placement" on page 3-51.
For an example of constraining shapes to grids, see "Constraining Shape Geometries to Grids" on page 3-40 and "Constraining Shapes to Device Grids" on page 3-42.
To examine the style attributes of a style object associated with a particular shape, use the
GXGetShapeStyleAttributes
function, which is described on page 3-112.To examine the style attributes of a style object, use the
GXGetStyleAttributes
function, which is described on page 3-109. To alter the style attributes of a style object, use theGXSetStyleAttributes
function, which is described on page 3-110.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help